﻿using Smark.Core;
using System;
using System.Reflection;
using System.Runtime.InteropServices;
using System.Security.Cryptography;
using System.Text;

internal class Class_y
{
    private static object _field_a = null;
    private static DESCrypto _field_b = new DESCrypto();

    private static void a()
    {
        DESCrypto.DESInfo info = new DESCrypto.DESInfo {
            IV = Convert.FromBase64String(Class_x._field_i),
            Key = Convert.FromBase64String(Class_r._field_c)
        };
        _field_b.KeyInfo = info;
    }

    public static bool a(byte[] A_0, byte[] A_1)
    {
        return ((RSACryptoServiceProvider) _field_a).VerifyData(A_0, "MD5", A_1);
    }

    public static bool a(string A_0, string A_1)
    {
        return a(Encoding.UTF8.GetBytes(A_0), Convert.FromBase64String(A_1));
    }

    public static void a(out string A_0, out string A_1)
    {
        A_0 = b();
        A_1 = c();
        A_0 = _field_b.Decrypt(A_0);
        A_1 = _field_b.Decrypt(A_1);
    }

    public static string b()
    {
        a();
        foreach (FieldInfo info in typeof(Class_b).GetFields(BindingFlags.Public | BindingFlags.Static))
        {
            if (info.GetCustomAttributes(typeof(Class_v), false).Length > 0)
            {
                return (((string) info.GetValue(null)) + Class_ab._field_a + Class_c._field_a);
            }
        }
        return null;
    }

    public static string c()
    {
        foreach (FieldInfo info in typeof(Class_b).GetFields(BindingFlags.Public | BindingFlags.Static))
        {
            if (info.GetCustomAttributes(typeof(Class_d), false).Length > 0)
            {
                return (string) info.GetValue(null);
            }
        }
        return null;
    }
}

